package BookManage.Servlet.Impl;

import BookManage.BookManage;
import BookManage.Servlet.BookManageServlet;
import BookManage.dao.BookManageDao;
import BookManage.dao.Impl.BookManageDaoImpl;

import java.util.List;

public class BookManageImplServlet implements BookManageServlet {
    @Override
    public List<BookManage> list(int BookNo, int BookSize) {
        BookManageDao bookManageDao=new BookManageDaoImpl();
        List<BookManage> list=bookManageDao.list(BookNo,BookSize);
        return list;
    }

    @Override
    public int sc(String id) {
        int count=0;
        BookManageDao bookManageDao=new BookManageDaoImpl();
        count=bookManageDao.sc(id);
        return count;
    }

    @Override
    public int xz(BookManage bookManage) {
        int count=0;
        if(bookManage!=null){
            BookManageDao bookManage1=new BookManageDaoImpl();
            count=bookManage1.xz(bookManage);
        }
        return count;
    }

    @Override
    public int xg(BookManage bookManage) {
        int count=0;
        if(bookManage!=null){
            BookManageDao manageDao=new BookManageDaoImpl();
            count=manageDao.xg(bookManage);
        }
        return count;
    }
}
